﻿@using NorthWind.Models

@model EditableSupplier
@{
    ViewBag.Title = "Edit";
}

<h2>Modifier le fournisseur </h2>

@using (Html.BeginForm("/Supplier/Edit/"))
{
    @Html.ValidationSummary("Corrigez svp les erreurs et recommencez.")

    @Html.HiddenFor(m => Model.SupplierID, Model.SupplierID)

    <fieldset style="width: auto;">
        <legend>Compagnie</legend>

        <table class="border_none">
            <tr>
                <td>@Html.LabelFor(m => Model.CompanyName)</td>
                <td>@Html.LabelFor(m => Model.ContactName)</td>
                <td>@Html.LabelFor(m => Model.ContactTitle)</td>
            </tr>

            <tr>
                <td>@Html.TextBoxFor(m => Model.CompanyName)</td>
                <td>@Html.TextBoxFor(m => Model.ContactName)</td>
                <td>@Html.TextBoxFor(m => Model.ContactTitle)</td>
            </tr>

            <tr>
                <td>@Html.ValidationMessageFor(m => Model.CompanyName)</td>
                <td>@Html.ValidationMessageFor(m => Model.ContactName)</td>
                <td>@Html.ValidationMessageFor(m => Model.ContactTitle)</td>
            </tr>
        </table>
        
    </fieldset>
    
    
    <fieldset>
        <legend>Adresse</legend>
        
        <table class="border_none">
            <tr>
                <td>@Html.LabelFor(m => Model.Address)</td>
                <td>@Html.LabelFor(m => Model.City)</td>
                <td>@Html.LabelFor(m => Model.Region)</td>
            </tr>

            <tr>
                <td>@Html.TextBoxFor(m => Model.Address)</td>
                <td>@Html.TextBoxFor(m => Model.City)</td>
                <td>@Html.TextBoxFor(m => Model.PostalCode)</td>
            </tr>
            
            <tr>
                <td>@Html.ValidationMessageFor(m => Model.Address)</td>
                <td>@Html.ValidationMessageFor(m => Model.City)</td>
                <td>@Html.ValidationMessageFor(m => Model.PostalCode)</td>
            </tr>

            <tr>
                <td>@Html.LabelFor(m => Model.Region)</td>
                <td>@Html.LabelFor(m => Model.Country)</td>
            </tr>

            <tr>
                <td>@Html.TextBoxFor(m => Model.Region)</td>
                <td>@Html.TextBoxFor(m => Model.Country)</td>
            </tr>
            
            <tr>
                <td>@Html.ValidationMessageFor(m => Model.Region)</td>
                <td>@Html.ValidationMessageFor(m => Model.Country)</td>
            </tr>
        </table>

        
    </fieldset>
    
    <fieldset>
        <legend>Coordonnées</legend>

        <table class="border_none">
            <tr>
                <td>@Html.LabelFor(m => Model.Phone)</td>
                <td>@Html.LabelFor(m => Model.Fax)</td>
                <td>@Html.LabelFor(m => Model.HomePage)</td>
            </tr>
            <tr>
                <td>@Html.TextBoxFor(m => Model.Phone)</td>
                <td>@Html.TextBoxFor(m => Model.Fax)</td>
                <td>@Html.TextBoxFor(m => Model.HomePage)</td>
            </tr>
            <tr>
                <td>@Html.ValidationMessageFor(m => Model.Phone)</td>
                <td>@Html.ValidationMessageFor(m => Model.Fax)</td>
                <td>@Html.ValidationMessageFor(m => Model.HomePage)</td>
            </tr>
        </table>
    </fieldset>
    
    <input type="submit" value="Modifer" />
}